import request from '@/http/request'
const apiUrl = 'bf-finance'

// -----------托育相关接口----------
export const childcareApi = {
    getMeetingData: (param) => request.post(`${apiUrl}/api/book/quality-training/data`, param),// 质量培训统计
    getMeetingList: (param) => request.post(`${apiUrl}/api/book/quality-training/list`, param), // 质量培训详情
    getTypeOptions: (param) => request.get(`${apiUrl}/childcare/getAllChildcarePark`, param),// 获取所有园区（资产）接口
    getTableData: (param) => request.post(`${apiUrl}/childcare/getChildcareCustomerPage`, param), // 分页托育客户接口
    getStatistics: (param) => request.post(`${apiUrl}/childcare/getChildcareStatistics`, param), // 托育管理界面统计接口
    getCustomerDetail:(id) => request.get(`${apiUrl}/childcare/getCustomer?customerId=${id}`),  //托育详情客户基础信息接口
    getPeriodsOption: (id) => request.get(`${apiUrl}/childcare/getPeriods?customerId=${id}`),  // 托育期数获取接口
    getAttendanceRecord: (id, periods) => request.get(`${apiUrl}/childcare/getAttendanceRecord?customerId=${id}&periods=${periods}`),  // 托育客户详情
    getChargeRecord: (id, periods) => request.get(`${apiUrl}/childcare/getChargeRecord?customerId=${id}&periods=${periods}`),  // 托育收费明细
    getDelayServiceRecord: (id) => request.get(`${apiUrl}/childcare/getDelayServiceRecord?customerId=${id}`), // 托育延时服务查询
}

// -----------租赁相关接口----------
export  const leaseApi = {
    getAllAssets: () => request.get(`${apiUrl}/lease/getAllAssets`), // 资产下拉框查询
    getAssetsLeasePage: (param) => request.post(`${apiUrl}/lease/getAssetsLeasePage`, param), // 分页查询租赁客户
    getLeaseStatistics: () => request.get(`${apiUrl}/lease/getLeaseStatistics`), // 管理界面金额统计
    getLeaseCustomer: (id) => request.get(`${apiUrl}/lease/getLeaseCustomer?contractId=${id}`), // 详情页查询客户及对应的资产信息
    getLeaseHousing: (id) => request.get(`${apiUrl}/lease/getLeaseHousing?contractId=${id}`), // 详情页查询租赁房源明细
    getRentPlan: (id) => request.get(`${apiUrl}/lease/getRentPlan?contractId=${id}`), // 详情页查询合同的租金计划信息
    getLeaseContract: (id) => request.get(`${apiUrl}/lease/getLeaseContract?contractId=${id}`), // 详情页查询合同信息
}
